package org.swiftsuspenders.injectionresults
{
	import org.swiftsuspenders.InjectionConfig;
	import org.swiftsuspenders.Injector;

	
public class InjectOtherRuleResult extends InjectionResult
{

	public function InjectOtherRuleResult(rule : InjectionConfig)
	{
		m_rule = rule;
	}
	
	
	private var m_rule : InjectionConfig;
	
	
	override public function getResponse(injector : Injector) : Object
	{
		return m_rule.getResponse(injector);
	}

	override public function equals(otherResult : InjectionResult) : Boolean
	{
		if (otherResult == this)
		{
			return true;
		}
		if (!(otherResult is InjectOtherRuleResult))
		{
			return false;
		}
		var castedResult : InjectOtherRuleResult =  InjectOtherRuleResult(otherResult);
		return castedResult.m_rule == m_rule;
	}
}
}